<template>
    <div>
        <a-card>
            <p v-if="noTitleKey == 'charge_toll_tollSet'">
                <component :is="goSet"></component>
            </p>

            <p v-if="noTitleKey == 'charge_toll_tollModel'">
                <component :is="goModel"></component>
            </p>

            <p v-if="noTitleKey == 'charge_toll_tollFormula'">
                <component :is="goFormula"></component>
            </p>

            <p v-if="noTitleKey == 'charge_toll_tollProject'">
                <component :is="goProject"></component>
            </p>
        </a-card>
    </div>
	
</template>

<script>
import charge_toll_tollSet from './tollSet'
import charge_toll_tollModel from './tollModel'
import charge_toll_tollFormula from './tollFormula'
import charge_toll_tollProject from './tollProject'
export default {
	name: 'charge_toll_index',
	components: {charge_toll_tollSet},
    data() {
        return {
			noTitleKey: 'charge_toll_tollProject',
            tabs: {
                active: () => this.noTitleKey,
                callback: key => {
                    console.log(key)
                    this.noTitleKey = key
                },
                items: [
                    {
                        key: 'charge_toll_tollProject',
                        title: '收费项目'
                    },
                    {
                        key: 'charge_toll_tollFormula',
                        title: '自定义公式'
                    },
                    {
                        key: 'charge_toll_tollModel',
                        title: '打印模版'
					},
					{
                        key: 'charge_toll_tollSet',
                        title: '账单设置'
                    }
                ]
			},
            goSet: 'charge_toll_tollSet',
            goModel: 'charge_toll_tollModel',
            goFormula: 'charge_toll_tollFormula',
            goProject: 'charge_toll_tollProject'
        }
	},
	created() {
		this.goSet = charge_toll_tollSet
        this.goModel = charge_toll_tollModel
        this.goFormula = charge_toll_tollFormula
        this.goProject = charge_toll_tollProject
	}
}
</script>

<style scoped>
</style>